[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[project]
name = "{{ python_package_distribution_name }}"
description = "{{ project_description }}"
authors = [{name = "{{ author_fullname }}", email = "{{ author_email }}"}]
license = {text = "
    {%- if copyright_license == "Academic Free License v3.0" -%}
    AFL-3.0
    {%- elif copyright_license == "Apache License 2.0" -%}
    Apache-2.0
    {%- elif copyright_license == "Artistic License 2.0" -%}
    Artistic-2.0
    {%- elif copyright_license == "BSD 2-Clause \"Simplified\" License" -%}
    BSD-2-Clause
    {%- elif copyright_license == "BSD 3-Clause Clear License" -%}
    BSD-3-Clause-Clear
    {%- elif copyright_license == "BSD 3-Clause \"New\" or \"Revised\" License" -%}
    BSD-3-Clause
    {%- elif copyright_license == "Boost Software License 1.0" -%}
    BSL-1.0
    {%- elif copyright_license == "Creative Commons Attribution 4.0" -%}
    CC-BY-4.0
    {%- elif copyright_license == "Creative Commons Attribution Share Alike 4.0" -%}
    CC-BY-SA-4.0
    {%- elif copyright_license == "Creative Commons Zero v1.0 Universal" -%}
    CC0-1.0
    {%- elif copyright_license == "Do What The F*ck You Want To Public License" -%}
    WTFPL
    {%- elif copyright_license == "Educational Community License v2.0" -%}
    ECL-2.0
    {%- elif copyright_license == "Eclipse Public License 1.0" -%}
    EPL-1.0
    {%- elif copyright_license == "Eclipse Public License 2.0" -%}
    EPL-2.0
    {%- elif copyright_license == "European Union Public License 1.1" -%}
    EUPL-1.1
    {%- elif copyright_license == "European Union Public License 1.2" -%}
    EUPL-1.2
    {%- elif copyright_license == "GNU Affero General Public License v3.0" -%}
    AGPL-3.0
    {%- elif copyright_license == "GNU General Public License v2.0" -%}
    GPL-2.0
    {%- elif copyright_license == "GNU General Public License v3.0" -%}
    GPL-3.0
    {%- elif copyright_license == "GNU Lesser General Public License v2.1" -%}
    LGPL-2.1
    {%- elif copyright_license == "GNU Lesser General Public License v3.0" -%}
    LGPL-3.0
    {%- elif copyright_license == "ISC License" -%}
    ISC
    {%- elif copyright_license == "LaTeX Project Public License v1.3c" -%}
    LPPL-1.3c
    {%- elif copyright_license == "MIT License" -%}
    MIT
    {%- elif copyright_license == "Mozilla Public License 2.0" -%}
    MPL-2.0
    {%- elif copyright_license == "Microsoft Public License" -%}
    MS-PL
    {%- elif copyright_license == "Microsoft Reciprocal License" -%}
    MS-RL
    {%- elif copyright_license == "University of Illinois/NCSA Open Source License" -%}
    NCSA
    {%- elif copyright_license == "SIL Open Font License 1.1" -%}
    OFL-1.1
    {%- elif copyright_license == "Open Software License 3.0" -%}
    OSL-3.0
    {%- elif copyright_license == "PostgreSQL License" -%}
    PostgreSQL
    {%- elif copyright_license == "The Unlicense" -%}
    Unlicense
    {%- elif copyright_license == "zlib License" -%}
    Zlib
    {%- endif %}"}
readme = "README.md"
requires-python = ">=3.9"
keywords = []
dynamic = ["version"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Topic :: Documentation",
    "Topic :: Software Development",
    "Topic :: Utilities",
    "Typing :: Typed",
]
dependencies = []

[project.urls]
Homepage = "https://{{ repository_namespace }}.{{ repository_provider.rsplit('.', 1)[0] }}.io/{{ repository_name }}"
Documentation = "https://{{ repository_namespace }}.{{ repository_provider.rsplit('.', 1)[0] }}.io/{{ repository_name }}"
Changelog = "https://{{ repository_namespace }}.{{ repository_provider.rsplit('.', 1)[0] }}.io/{{ repository_name }}/changelog"
Repository = "https://{{ repository_provider }}/{{ repository_namespace }}/{{ repository_name }}"
Issues = "https://{{ repository_provider }}/{{ repository_namespace }}/{{ repository_name }}/issues"
Discussions = "https://{{ repository_provider }}/{{ repository_namespace }}/{{ repository_name }}/discussions"
Gitter = "https://gitter.im/{% if repository_namespace != author_username %}{{ repository_namespace }}/{{ repository_name }}{% else %}{{ repository_name }}/community{% endif %}"
{%- if repository_provider == "github.com" %}
Funding = "https://{{ repository_provider }}/sponsors/{{ author_username }}"
{%- endif %}

{% if python_package_command_line_name -%}
[project.scripts]
{{ python_package_command_line_name }} = "{{ python_package_import_name }}.cli:main"

{% endif -%}

[tool.pdm.version]
source = "call"
getter = "scripts.get_version:get_version"

[tool.pdm.build]
# Include as much as possible in the source distribution, to help redistributors.
excludes = ["**/.pytest_cache"]
source-includes = [
    "config",
    "docs",
    "scripts",
    "share",
    "tests",
    "duties.py",
    "mkdocs.yml",
    "*.md",
    "LICENSE",
]

[tool.pdm.build.wheel-data]
# Manual pages can be included in the wheel.
# Depending on the installation tool, they will be accessible to users.
# pipx supports it, uv does not yet, see https://github.com/astral-sh/uv/issues/4731.
data = [
    {path = "share/**/*", relative-to = "."},
]

[dependency-groups]
dev = [
    # maintenance
    "build>=1.2",
    "git-changelog>=2.5",
    "twine>=5.1",

    # ci
    "duty>=1.4",
    "ruff>=0.4",
    "pytest>=8.2",
    "pytest-cov>=5.0",
    "pytest-randomly>=3.15",
    "pytest-xdist>=3.6",
    "mypy>=1.10",
    "types-markdown>=3.6",
    "types-pyyaml>=6.0",

    # docs
    "black>=24.4",
    "markdown-callouts>=0.4",
    "markdown-exec>=1.8",
    "mkdocs>=1.6",
    "mkdocs-coverage>=1.0",
    "mkdocs-gen-files>=0.5",
    "mkdocs-git-revision-date-localized-plugin>=1.2",
    "mkdocs-literate-nav>=0.6",
    "mkdocs-material>=9.5",
    "mkdocs-minify-plugin>=0.8",
    "mkdocstrings[python]>=0.25",
    # YORE: EOL 3.10: Remove line.
    "tomli>=2.0; python_version < '3.11'",
]